@Returns:
-<!-- ##### FUNCTION gtk_exit ##### -->
-<para>
-Terminates the program and returns the given exit code to the caller.
-This function will shut down the GUI and free all resources allocated
-for GTK+.
-</para>
-
-@error_code: Return value to pass to the caller. This is dependent on the
-target system but at least on Unix systems %0 means success.
-@Deprecated: Use the standard exit() function instead.
-
-
<!-- ##### FUNCTION gtk_events_pending ##### -->
<para>
Checks if any events are pending. This can be used to update the GUI
@data: The pointer passed as @data to gtk_quit_add() or gtk_quit_add_full().
-<!-- ##### FUNCTION gtk_timeout_add_full ##### -->
-<para>
-Registers a function to be called periodically. The function will be called
-repeatedly after @interval milliseconds until it returns %FALSE at which
-point the timeout is destroyed and will not be called again.
-</para>
-
-@interval: The time between calls to the function, in milliseconds
- (1/1000ths of a second.)
-@function: The function to call periodically.
-@marshal: The marshaller to use instead of the function (if non-%NULL).
-@data: The data to pass to the function.
-@destroy: Function to call when the timeout is destroyed or %NULL.
-@Returns: A unique id for the event source.
-@Deprecated: 2.4: Use g_timeout_add_full() instead.
-
-
-<!-- ##### FUNCTION gtk_timeout_add ##### -->
-<para>
-Registers a function to be called periodically. The function will be called
-repeatedly after @interval milliseconds until it returns %FALSE at which
-point the timeout is destroyed and will not be called again.
-</para>
-
-@interval: The time between calls to the function, in milliseconds
- (1/1000ths of a second.)
-@function: The function to call periodically.
-@data: The data to pass to the function.
-@Returns: A unique id for the event source.
-@Deprecated: 2.4: Use g_timeout_add() instead.
-
-
-<!-- ##### FUNCTION gtk_timeout_remove ##### -->
-<para>
-Removes the given timeout destroying all information about it.
-</para>
-
-@timeout_handler_id: The identifier returned when installing the timeout.
-@Deprecated: 2.4: Use g_source_remove() instead.
-
-
-<!-- ##### FUNCTION gtk_idle_add ##### -->
-<para>
-Causes the mainloop to call the given function whenever no events with
-higher priority are to be processed. The default priority is
-%GTK_PRIORITY_DEFAULT, which is rather low.
-</para>
-
-@function: The function to call.
-@data: The information to pass to the function.
-@Returns: a unique handle for this registration.
-@Deprecated: 2.4: Use g_idle_add() instead.
-
-
-<!-- ##### FUNCTION gtk_idle_add_priority ##### -->
-<para>
-Like gtk_idle_add() this function allows you to have a function called
-when the event loop is idle. The difference is that you can give a
-priority different from %GTK_PRIORITY_DEFAULT to the idle function.
-</para>
-
-@priority: The priority which should not be above %G_PRIORITY_HIGH_IDLE.
-Note that you will interfere with GTK+ if you use a priority above
-%GTK_PRIORITY_RESIZE.
-@function: The function to call.
-@data: Data to pass to that function.
-@Returns: A unique id for the event source.
-@Deprecated: 2.4: Use g_idle_add_full() instead.
-
-
-<!-- ##### FUNCTION gtk_idle_add_full ##### -->
-<para>
-Like gtk_idle_add() this function allows you to have a function called
-when the event loop is idle. The difference is that you can give a
-priority different from %GTK_PRIORITY_DEFAULT to the idle function.
-</para>
-
-@priority: The priority which should not be above %G_PRIORITY_HIGH_IDLE.
-Note that you will interfere with GTK+ if you use a priority above
-%GTK_PRIORITY_RESIZE.
-@function: The function to call.
-@marshal: The marshaller to use instead of the function (if non-%NULL).
-@data: Data to pass to that function.
-@destroy: Function to call when the timeout is destroyed or %NULL.
-@Returns: A unique id for the event source.
-@Deprecated: 2.4: Use g_idle_add_full() instead.
-
-
-<!-- ##### FUNCTION gtk_idle_remove ##### -->
-<para>
-Removes the idle function with the given id.
-</para>
-
-@idle_handler_id: Identifies the idle function to remove.
-@Deprecated: 2.4: Use g_source_remove() instead.
-
-
-<!-- ##### FUNCTION gtk_idle_remove_by_data ##### -->
-<para>
-Removes the idle function identified by the user data.
-</para>
-
-@data: remove the idle function which was registered with this user data.
-@Deprecated: 2.4: Use g_idle_remove_by_data() instead.
-
-
-<!-- ##### FUNCTION gtk_input_add_full ##### -->
-<para>
-Registers a function to be called when a condition becomes true
-on a file descriptor.
-</para>
-
-@source: a file descriptor.
-@condition: the condition.
-@function: The function to call.
-@marshal: The marshaller to use instead of the function (if non-%NULL).
-@data: callback data passed to @function.
-@destroy: callback function to call with @data when the input
- handler is removed, or %NULL.
-@Returns: A unique id for the event source; to be used with gtk_input_remove().
-@Deprecated: 2.4: Use g_io_add_watch_full() instead.
-
-
-<!-- ##### FUNCTION gtk_input_remove ##### -->
-<para>
-Removes the function with the given id.
-</para>
-
-@input_handler_id: Identifies the function to remove.
-@Deprecated: 2.4: Use g_source_remove() instead.
-
-
-<!-- ##### MACRO GTK_PRIORITY_REDRAW ##### -->
-<para>
-Use this priority for redrawing related stuff. It is used internally by
-GTK+ to do pending redraws. This priority is lower than %GTK_PRIORITY_RESIZE
-to avoid redrawing a widget just before resizing (and therefore redrawing
-it again).
-</para>
-
-@Deprecated: 2.4: This macro is deprecated. You should use %GDK_PRIORITY_REDRAW instead.
-
-
<!-- ##### MACRO GTK_PRIORITY_RESIZE ##### -->
<para>
Use this priority for resizing related stuff. It is used internally by
GTK+ to compute the sizes of widgets. This priority is higher than
-%GTK_PRIORITY_REDRAW to avoid resizing a widget which was just redrawn.
+%GDK_PRIORITY_REDRAW to avoid resizing a widget which was just redrawn.
</para>
-
-<!-- ##### MACRO GTK_PRIORITY_HIGH ##### -->
-<para>
-Use this for high priority timeouts. This priority is never used inside
-GTK+ so everything running at this priority will be running before anything
-inside the toolkit.
-</para>
-
-@Deprecated: 2.4: This macro is deprecated. You should use %G_PRIORITY_HIGH instead.
-
-
-<!-- ##### MACRO GTK_PRIORITY_INTERNAL ##### -->
-<para>
-This priority is for GTK+ internal stuff. Don't use it in your applications.
-</para>
-
-
-
-<!-- ##### MACRO GTK_PRIORITY_DEFAULT ##### -->
-<para>
-Default priority for idle functions.
-</para>
-
-@Deprecated: 2.4: This macro is deprecated. You should use %G_PRIORITY_DEFAULT_IDLE instead.
-
-
-<!-- ##### MACRO GTK_PRIORITY_LOW ##### -->
-<para>
-Priority for very unimportant background tasks.
-</para>
-
-@Deprecated: 2.4: This macro is deprecated. You should use %G_PRIORITY_LOW instead.
-
-
<!-- ##### FUNCTION gtk_key_snooper_install ##### -->
<para>
Installs a key snooper function, which will get called on all key events
destroy_progress (GtkWidget *widget,
ProgressData **pdata)
{
- gtk_timeout_remove ((*pdata)->timer);
+ g_source_remove ((*pdata)->timer);
(*pdata)->timer = 0;
(*pdata)->window = NULL;
g_free (*pdata);
gtk_progress_set_format_string (GTK_PROGRESS (pdata->pbar),
"%v from [%l,%u] (=%p%%)");
gtk_container_add (GTK_CONTAINER (align), pdata->pbar);
- pdata->timer = gtk_timeout_add (100, progress_timeout, pdata->pbar);
+ pdata->timer = g_timeout_add (100, (GSourceFunc)progress_timeout, pdata->pbar);
align = gtk_alignment_new (0.5, 0.5, 0, 0);
gtk_box_pack_start (GTK_BOX (vbox2), align, FALSE, FALSE, 5);
{
if (!timer)
{
- timer = gtk_timeout_add (100, (GtkFunction) timeout_test, label);
+ timer = g_timeout_add (100, (GSourceFunc)timeout_test, label);
}
}
{
if (timer)
{
- gtk_timeout_remove (timer);
+ g_source_remove (timer);
timer = 0;
}
}
{
if (!idle_id)
{
- idle_id = gtk_idle_add ((GtkFunction) idle_test, label);
+ idle_id = g_idle_add ((GSourceFunc) idle_test, label);
}
}
{
if (idle_id)
{
- gtk_idle_remove (idle_id);
+ g_source_remove (idle_id);
idle_id = 0;
}
}